﻿<Page x:Class="Microsoft.Samples.Office.UnifiedCommunications.Gadget.Top5Config"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:Microsoft.Samples.Office.UnifiedCommunications.Gadget"
    Title="Top 5 Configuration" ShowsNavigationUI="False" ClipToBounds="True">
    <Page.Resources>
        <Storyboard x:Key="LoadAni">
            <local:BackDoubleAnimation Completed="BackDoubleAnimation_Completed" From="300" To="0" Duration="0:0:0.8" EdgeBehavior="EaseOut" Amplitude=".5"   Suppression="0" DecelerationRatio=".5" Storyboard.TargetName="mainGrid" Storyboard.TargetProperty="(UIElement.RenderTransform).(TranslateTransform.X)"/>
        </Storyboard>
    </Page.Resources>
    <Page.Triggers>
        <EventTrigger RoutedEvent="FrameworkElement.Loaded">
            <BeginStoryboard Storyboard="{StaticResource LoadAni}"/>
        </EventTrigger>
    </Page.Triggers>
    <Grid x:Name="mainGrid">
        <Grid.RenderTransform>
            <TranslateTransform X="0" Y="0"/>
        </Grid.RenderTransform>
        <Border BorderThickness="1,1,1,1" BorderBrush="#FF333945" CornerRadius="9,9,9,9">
            <Border Width="Auto" Height="Auto" BorderBrush="#FF161D25" BorderThickness="1,1,1,1" CornerRadius="8,8,8,8">
                <Grid Width="Auto" Height="Auto" x:Name="ContentGrid">
                    <Rectangle Stroke="{x:Null}" RadiusX="8" RadiusY="8" Width="Auto" Height="Auto" MinHeight="380" MinWidth="280">
                        <Rectangle.Fill>
                            <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                <GradientStop Color="#FFDAE3EF" Offset="0"/>
                                <GradientStop Color="#FFE2EBF1" Offset="1"/>
                            </LinearGradientBrush>
                        </Rectangle.Fill>
                    </Rectangle>
                    <TextBlock HorizontalAlignment="Center" VerticalAlignment="Top" Text="Top 5 Configuration" TextWrapping="Wrap" Foreground="#FF3D4F73" FontFamily="Calibri" FontSize="16" FontWeight="Bold" Margin="0,10,0,0"/>
                    
                    <Grid x:Name="gridContent" Margin="10,50,10,0">
                        <StackPanel Orientation="Vertical" VerticalAlignment="Stretch" >
                            <TextBlock FontFamily="Calibri" FontSize="14" Text="Determine my Top 5 contacts based on:"/>
                            <CheckBox x:Name="chkTagged" Style="{DynamicResource BigCheckBoxStyle}" Content="Tagged Contacts" HorizontalAlignment="Left" Margin="5,20,0,8"/>
                            <CheckBox x:Name="chkTeamMembership" Style="{DynamicResource BigCheckBoxStyle}" Content="Team Membership" HorizontalAlignment="Left" Margin="5,8,0,8" Visibility="Collapsed"/>
                            <CheckBox x:Name="chkIMFrequency" Style="{DynamicResource BigCheckBoxStyle}" Content="IM Frequency (Last 24 Hours)" HorizontalAlignment="Left" Margin="5,8,0,8"/>
                            <CheckBox x:Name="chkCallFrequency" Style="{DynamicResource BigCheckBoxStyle}" Content="Call Frequency (Last 24 hours)" HorizontalAlignment="Left" Margin="5,8,0,8"/>
                            <CheckBox x:Name="chkEmailFrequency" Style="{DynamicResource BigCheckBoxStyle}" Content="Email Frequency (Last 24 hours)" HorizontalAlignment="Left" Margin="5,8,0,8"/>
                        </StackPanel>
                    </Grid>
                    
                    <Grid x:Name="gridMessage" Visibility="Collapsed" VerticalAlignment="Bottom"  Margin="0,0,0,100">
                        <Border BorderBrush="#70FB350B" Background="#70FB350B" CornerRadius="2" Width="200" 
                                BorderThickness="1" Padding="0" VerticalAlignment="Center" HorizontalAlignment="Center">
            		        <TextBlock x:Name="tbMessage" FontFamily="Calibri" FontSize="14" 
                               Foreground="#FFFFFFFF" HorizontalAlignment="Center" Margin="0,0,0,0"
                               VerticalAlignment="Center" TextWrapping="Wrap" />
                        </Border>
                    </Grid>
                    
                    <Button x:Name="btnApply" Click="btnApply_Click" VerticalAlignment="Bottom" Content="Apply" Style="{DynamicResource BtnGeneric}" Width="60" Height="20" Margin="0,0,0,10"/>
                    <Button x:Name="btnCancel" Click="btnCancel_Click" HorizontalAlignment="Right" VerticalAlignment="Bottom" Content="Close" Style="{DynamicResource BtnGeneric}" Width="60" Height="20" Margin="10,0,50,10"/>
                    <Button Template="{DynamicResource ImageButton}" Height="29" Width="29" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,10,5" x:Name="btnHelp">
                        <Image Width="29" Height="29" Source="Resources\Images\helpBtn.png" Stretch="Uniform" StretchDirection="DownOnly"/>
                    </Button>
                    <Grid x:Name="tooltip" Opacity="0" Width="250" Height="350" VerticalAlignment="Bottom" Visibility="Hidden"  HorizontalAlignment="Right" Margin="0,0,26,13">
                    	<Image Source="{StaticResource toolTip}" />                    		
                    	
                    	<TextBlock Foreground="#FFFFFF" FontSize="8.7pt" Margin="17,60,40,20" TextWrapping="Wrap" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" TextAlignment="Left"><Run FontSize="9.3pt" Text="Top 5 Configuration Instructions"/><LineBreak /><LineBreak /><Run Foreground="#9FFFFFFF" Text="Choose the metrics that the gadget uses to calculate your Top 5 contacts"/></TextBlock>
                    </Grid>
    			</Grid>
            </Border>
        </Border>
    </Grid>
</Page>